using MicroMsg.UI.Util;
using Microsoft.Phone.Controls;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
namespace MicroMsg.UI.Page
{
	public class ServerBulletinPage : BasePage
	{
		internal Grid LayoutRoot;
		internal WebBrowser webBrowser;
		private bool _contentLoaded;
		public ServerBulletinPage()
		{
			this.InitializeComponent();
		}
		protected override void OnPageIn(object[] object_0)
		{
			if (object_0 != null && object_0.Length > 0)
			{
				string text = object_0[0] as string;
				if (text != null)
				{
					this.webBrowser.add_LoadCompleted(new LoadCompletedEventHandler(this.webBrowser_loaded));
					this.webBrowser.set_Source(new Uri(text));
					return;
				}
				base.GoBack();
			}
		}
		private void webBrowser_loaded(object sender, EventArgs e)
		{
			Thickness margin = this.webBrowser.get_Margin();
			margin.set_Left(0.0);
			this.webBrowser.set_Margin(margin);
		}
		protected override void OnPageOut()
		{
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/Bulletin/ServerBulletinPage.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.webBrowser = (WebBrowser)base.FindName("webBrowser");
		}
	}
}
